#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
#include<math.h>
void paixu(int arr[], int x, int y);
int main(void)
{
	int n = 0,i=0,m=1;
	int arr[100] = { 0 };
	scanf("%d", &n);
	for (i = 0; i < n; i++)
		scanf("%d", &arr[i]);
    for (i = 0; i < n - 1; i++)
		for (m = i + 1; m < n; m++)
			paixu(arr, i, m);
    printf("%d", arr[0]);
	for (i = 1; i < n; i++)
		printf(" %d", arr[i]);
	return 0;
}
void paixu(int arr[], int x, int y)
{
	int temp = 0;
	if (abs(arr[x]) < abs(arr[y]))
	{
		temp = arr[x];
		arr[x] = arr[y];
		arr[y] = temp;
	}
}
